package com.sss.springcloud.service;

import com.sss.springcloud.common.Result;
import com.sss.springcloud.service.impl.AccountServiceFeignFallback;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @author sss
 * @date 2020-03-13 12:42
 **/
@Component
@FeignClient(value = "cloud-seata-storage-service",fallback = AccountServiceFeignFallback.class)
public interface StorageService {

    @PostMapping("storage/decrease")
    Result decrease(@RequestParam("productId") Long productId, @RequestParam("count") Integer count);
}
